from connection import Book, Session


session = Session()
results = session.query(Book).all()

for result in results:
    print(result)

print("===================filter=====================")
res = session.query(Book).filter(Book.price < 100)

for r in res:
    print(r)

print("===================first=====================")
res = session.query(Book).filter(Book.price < 100).first()
print(res)
